<script setup>
import { reactive } from 'vue';
import { ArrowRight } from '@element-plus/icons-vue'
const cards=reactive([{
    status:1,
    subject1:'统招专升本',
    subject2:'专业课',
    time:'14:00-14:43',
    avator:'',
    // date:'2024-11-01',
    teacher:'燕燕老师',
    course:'凯恩斯节俭悖论',
    liveId:'0'
},{
    status:0,
    subject1:'统招专升本',
    subject2:'专业课',
    avator:'',
    time:'14:00-14:43',
    teacher:'燕燕老师',
    course:'凯恩斯节俭悖论',
    liveId:'1'
},{
    status:0,
    subject1:'统招专升本',
    subject2:'专业课',
    time:'14:00-14:43',
    avator:'',
    teacher:'燕燕老师',
    course:'凯恩斯节俭悖论',
    liveId:'2'
}])
</script>

<template>
    <div class="container">
       <p class="title"><span>今日直播</span><el-icon :size="18"><ArrowRight/></el-icon></p>
       <div class="cards">
        <el-card class="the-card" v-for="item,index in cards" :key="index">
            <p class="status" v-if="item.status=='1'">直播图标</p>
            <p class="status" v-else>{{item.time}}</p>
            <p class="course">{{ item.course }}</p>
            <p class="subject"><span>{{ item.subject1 }}</span>|<span>{{ item.subject2 }}</span></p>
            <div class="avator-container">
                <img class="avator" src="" alt="">
                <span>{{ item.teacher }}</span>
            </div>
            <div class="split"></div>
            <div class="btns">
                <el-button class="detail" type="primary" plain round>查看详情</el-button>
                <el-button type="success" v-if="item.status=='1'" round>进入直播</el-button>
                <el-button type="primary" v-else round>立即预约</el-button>
            </div>
        </el-card>
       </div>
    </div>

</template>

<style scoped >
.container .title{
    font-size: 32px;
    font-weight: bold;
    line-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cards{
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}
.the-card{
    width: 350px;
    height: 375px;
}
.the-card .course{
    margin: 15px 0 50px;
}
.the-card .course{
font-size: 20px;
}
.avator-container{
    height: 130px;
    padding: 20px 0;
}
.avator-container .avator{
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: block;
}
.split{
    width: 100%;
    height: 1px;
    background-color: var(--backgrond-color);
}
.the-card .btns{
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
}
</style>